The present invention is generally related to network communications, and more particularly to data access via a computer filesystem.
A computer filesystem functions as an interface between applications and data. For example, when an application attempts to access stored data the filesystem translates the representation of data provided by the application to positions on physical storage media. Such translation is facilitated through use of metadata that is maintained by the filesystem. The metadata describes the organization and structuring of files, file attributes, permissions; and the file layout in terms of block address chains.
One shortcoming associated with filesystems is relatively slow operation. For example, filesystems are not particularly well suited for processing voice and video data that is streamed over a network in real time; nor for volume data transfers which involve large quantities of information being moved from a single source to a single destination for backup, replication, or other purposes. Consequently, filesystems may present a bottleneck to delivery of real time audio and video via computer networks such as the Internet.
In accordance with the present invention, an accelerated filesystem includes a fast-path and a slow-path. The fast-path includes a data storage control circuit and a circuit for diverting selected requests for data transfer to the data storage control circuit. The data storage control circuit employs metadata to perform file handle to block list translation, and prompts retrieval of data from data storage.
In one embodiment of the invention, uncontested READ operations are processed on the fast-path and other operations are processed on the slow-path. A READ operation is generally initiated by a request from an application to open a file for reading. In response to the request an enhanced network processing passes the request to an exception processing function that is associated with the slow-path. The file is then reviewed to ensure that existence, privileges, locking, and other designated criteria are met. If the criteria are met, corresponding file-storage metadata is obtained and tagged with a session ID that is unique to the node for a period much longer than the file remains open to the requestor. The session ID is provided to the application as a file handle. The tagged metadata for that file""s layout is provided to an enhanced storage controller that is associated with the fast-path. The session ID is also recorded at the enhanced network processing function to allow its recognition of subsequent requests in this session. Subsequent accesses associated with this READ session is facilitated by communicating the file handle from the application to the enhanced network processing function, which recognizes the file handle or xe2x80x9csession IDxe2x80x9d as signifying xe2x80x9cfast-pathxe2x80x9d treatment and so passes the file handle to the enhanced storage controller. The enhanced storage controller executes a file handle to block list translation by employing the tagged metadata to retrieve the appropriate data. The retrieved data is delivered directly to the enhanced network processing function, and is then transmitted to the application.
The accelerated filesystem facilitates delivery of real-time voice and video data. Data access operations might be said to include OPEN, READ, WRITE, select/poll, ioctl/devctl, and CLOSE. Voice and video streaming generally employ uncontested READ operations. An uncontested READ operation indicates a situation where no file writer exists during the READ session. It has been recognized that uncontested READ operations are generally less complex to execute than other operations and can be partially automated. In particular, access to file metadata is sufficient to enable identification of the next block or blocks of data to be retrieved. Early recognition and rerouting of such uncontested READs reduces latency by avoiding use of the main node CPU. In particular, the enhanced-network processing function employs dedicated hardware or network-processor engines to recognize and reroute uncontested READs directly to the enhanced storage controller. The block list, or partial block list, for the file is maintained by the enhanced storage controller function. Data retrieval from storage can be delivered directly to the enhanced network processing function. Consequently, generation of copies in main memory may be avoided, memory consumption and copy latency may be reduced, and delivery of real-time voice and video data may be accelerated.
WRITE operations may also be placed on the fast-path when storage-device activity can be constrained to a single writer and no readers, from the perspective of the storage device. To allow unsupervised fast-path writes, storage blocks are preallocated. The list of preallocated blocks is tagged and the tagged list provided to the storage controller. The FileID is also provided to the application and the enhanced network processing function. When a file handle corresponding to the FileID is recognized by the enhanced network processing function during subsequent WRITE operations associated with the session, the FileID and data are provided to the storage controller. The FileID is employed to identify the list of preallocated blocks into which the data is placed. Block preallocation has an advantage for streaming traffic since the blocks can be allocated to optimize retrieval performance, thus improving transfer performance.